#ifndef SINGLEPAGEVIEW_H
#define SINGLEPAGEVIEW_H

#include <QtGui/QWidget>
#include <QWebView>
#include <QDockWidget>
#include <QCoreApplication>
#include <QGridLayout>
#include "abstractview.h"
#include "mainwindow.h"
#include "bookdata.h"

namespace Ui {
    class SinglePageView;
}

class SinglePageView : public AbstractView {
    Q_OBJECT
public:
    SinglePageView(QWidget *parent = 0);
    ~SinglePageView();
    virtual void preview();
    virtual void load(const QString &url);
    virtual void show(int index);
    virtual void showNext();
    virtual void showPrevious();
protected:
    void changeEvent(QEvent *e);
private:
    Ui::SinglePageView *m_ui;
    int showStart;
    int lineCount;

    QWebView* webView;
    QGridLayout *mainLayout;
    BookData* bookData;
    int index;
};

#endif // SINGLEPAGEVIEW_H
